// The Vue build version to load with the `import` command
// (runtime-only or standalone) has been set in webpack.base.conf with an alias.
import Vue from 'vue'
import router from './router';
import './util/filter';
import VueBus from 'vue-bus';

Vue.use(VueBus);

import iView from 'iview'; // 导入组件库
import 'iview/dist/styles/iview.css'; // 导入样式

// cms引入css
import './assets/css/admin/bootstrap.css';
import './assets/css/admin/sfy_nav.css'
import './assets/css/admin/reset.css';
import './assets/css/admin/index.css';
import './assets/css/admin/main.css';
import './assets/css/admin/iconfont.css';

iView.iCircle = iView.Circle;
iView.iSwitch = iView.Switch;
iView.iCircle.name = 'iCircle';
iView.iSwitch.name = 'iSwitch';
Vue.use(iView);

import util from "@/util/util"
import store from '@/util/store/index';
import editor from '@/components/layout/Editor.vue';
import BreadCrumb from "@/components/layout/Bread.vue";

Vue.component('editor', editor);
Vue.component('bread-crumb', BreadCrumb);

Vue.prototype.util = util;

import axios from './util/axios.js'

Vue.prototype.axios = axios;
Vue.config.productionTip = false;

import App from './App';

/* eslint-disable no-new */
new Vue({
  el: '#app',
  router,
  store,
  // template: '<App/>',   // 1.0旧写法
  render: h => h(App)      // 2.0新写法
});
